package com.hyq.market.ui.goodsDetail;

import com.hyq.market.api.AbsServiceUtils;
import com.hyq.market.api.BaseRequest;
import com.hyq.market.api.Constant;
import com.hyq.market.base.NetCallback;

import org.xutils.http.RequestParams;

/**
 * Created by Administrator on 2017/7/23 0023.
 */

public class ModelGoodDetail extends AbsServiceUtils {
    @Override
    public <T> T fromJson(String json) {
        return null;
    }

    @Override
    public <T> void getData(T t, NetCallback netCallback) {
        super.getData(t, netCallback);
        BaseRequest request= (BaseRequest) t;

        RequestParams params=new RequestParams(Constant.API_Goods_index);
        params.addBodyParameter("id",request.getId());
     //   params.addHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36");
//        params.addBodyParameter("type",baseRequest.getAccountType());
//        params.addBodyParameter("code",baseRequest.getCode());
//        params.addBodyParameter("grant_type","authorization_code");
        sendToServer(params,1);
    }
}
